// 路由规则表
const routes = [
  {
    path: '/',
    component: () => import('@/views/home/index.vue'),
    beforeEnter: (to, from) => {
      console.log('路由独享守卫 -- beforeEnter')
    }
  },
  {
    path: '/about',
    name: 'about',
    component: () => import('@/views/about/index.vue')
  },
  // {
  //   path: '/todo',
  //   component: () => import('@/views/todo/index.vue')
  // },
  {
    path: '/login',
    component: () => import('@/views/login/index.vue')
  },
  {
    path: '/news/:id',
    component: () => import('@/views/news/index.vue'),
    beforeEnter: (to, from) => {
      console.log('路由独享守卫 -- news -- beforeEnter')
    }
  }
]

export default routes
